//
//  SKSetFavoriteViewController.m
//  Gastrosoph
//
//  Created by 张明磊 on 12-10-16.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "SKSetFavoriteViewController.h"
#import "SKHeaderFiles.h"
#import "SKMainViewController.h"

@interface SKSetFavoriteViewController ()

@end

@implementation SKSetFavoriteViewController



- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self install_View_Title];
    
	// Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

#pragma mark - 
#pragma mark InstallView


- (void)install_View_Title
{    
    [self.view setBackgroundColor:[UIColor scrollViewTexturedBackgroundColor]];
    
    SKCustomNavigationBar *customNavigationBar = [[SKCustomNavigationBar alloc] initWithFrame:SK_CUSTOMNAVIGATIONBAR_CGRECT];
    
    UILabel *label_title = [[UILabel alloc] initWithFrame:CGRectMake(80, 0, 160, 44)];
    
    [label_title setBackgroundColor:[UIColor clearColor]];
    
    [label_title setTextColor:[UIColor whiteColor]];
    
    [label_title setText:@"喜好设置"];
    
    [label_title setTextAlignment:UITextAlignmentCenter];
    
    UIButton *button_jumpOver = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    
    [button_jumpOver setBackgroundColor:[UIColor blackColor]];
    
    [button_jumpOver setFrame:CGRectMake(260, 4, 55, 36)];
    
    [button_jumpOver addTarget:self action:@selector(button_click_jumpOver) forControlEvents:UIControlEventTouchUpInside];
    
    [button_jumpOver setBackgroundImage:[UIImage imageNamed:@"button_jumpOver.png"] forState:UIControlStateNormal];
    
    //[button_jumpOver setTitle:@"跳过" forState:UIControlStateNormal];
    
    [customNavigationBar addSubview:label_title];
    
    [label_title release];
    
    [customNavigationBar addSubview:button_jumpOver];
    
    [self.view addSubview:customNavigationBar];
    
    [customNavigationBar release];
    
    UIButton *button_finishSet = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    
    [button_finishSet setFrame:CGRectMake(10, 390, 300, 50)];
    
    [button_finishSet setBackgroundImage:[UIImage imageNamed:@"button_finish.png"] forState:UIControlStateNormal];
    
    [button_finishSet setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    [button_finishSet setTitle:@"完成" forState:UIControlStateNormal];
    
    [button_finishSet addTarget:self action:@selector(button_click_finishSet) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:button_finishSet];
    
}


- (void)button_click_jumpOver
{
    SKMainViewController *mainViewController = [[[SKMainViewController alloc] init] autorelease];
    
    [self presentViewController:mainViewController animated:NO completion:nil];
}

- (void)button_click_finishSet
{
    
}

@end
